﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using asscope.core;
using asscope.configuration;


namespace asscope.WebSite
{
    public partial class _Default : System.Web.UI.Page
    {

        asscope.utils.controls.DDownList ddlUtils = new asscope.utils.controls.DDownList();


        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("hello world");


            //RetriveData();
        }


        private void RetriveData()
        {
            var cnSrv = new core.Services.Country();
            var titleSrv = new core.Services.Title();
            var sportSrv = new core.Services.Sport();

            core.Entities.Country[] countries;
            countries = cnSrv.SelectAll();

            core.Entities.Title[] titles;
            titles = titleSrv.SelectAll();



            core.Entities.Sport[] sports;
            sports = sportSrv.SelectAll();

            



            ddlUtils.FillCountries(ddlCountries,countries);

            ddlUtils.FillTitles(ddlTitles,titles);

            ddlUtils.FillYesNo(ddlYN);

            ddlUtils.FillSports(ddlSports, sports);

            /*

            ddlCountries.Items.Clear();
            ddlCountries.Items.Add(new ListItem("- Select -", ""));
            foreach (var cn in countries)
            {
                if (cn.id != string.Empty)
                {
                    ddlCountries.Items.Add(new ListItem(cn.name, cn.id));
                }
            }
             * 
             * */


            //DropDownList.DataSource = countries;

            //GridView1.DataBind();

            /*

            if (txtkeyword.Text.Trim() != string.Empty)
            {
                branchs = ddlField.SelectedValue == "CentralName" ? branchSrv.Filter(txtkeyword.Text.Trim(), "") : branchSrv.Filter("", txtkeyword.Text.Trim());

                RadGrid1.DataSource = branchs;
                RadGrid1.DataBind();
            }
            else
            {
                branchs = branchSrv.SelectAll();
                RadGrid1.DataSource = branchs;
                RadGrid1.DataBind();
            }
             * */
        }


    }
}
